<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/sks/cms/page/share/taglib.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<% String path = request.getContextPath();
   String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
   String menuName = request.getParameter("menuName") == null ? "" : (String)request.getParameter("menuName");
%>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="租房,买房,三棵松,地产,中介" />
<meta name="description" content="三棵松地产" />
<title>三棵松地产</title>
<link rel="stylesheet" type="text/css" media="screen" href="<%=basePath %>sks/css/frontpages/BrightSide.css" />
<link rel="stylesheet" type="text/css" media="screen" href="<%=basePath %>sks/css/frontpages/mytestcss.css" />
</head>
<script type="text/javascript">
/*
 * http://developer.51cto.com/art/201009/225708_1.htm
 * 原理是对元素的所有的子节点做一个遍历。然后做一个判断，如果是子元素节点（nodeType = 1），
 * 则遍历该子元素的所有的子节点，用递归检查是否包含空白节点；如果处理的子节点是文本节点（nodeType = 3），
 * 则检查是否是纯粹的空白节点，如果是，就将它从xml对象中删除。
*/
function removeWhitespace(xml){
    var loopIndex;
    for (loopIndex = 0; loopIndex < xml.childNodes.length; loopIndex++){
        var currentNode = xml.childNodes[loopIndex];
        if (currentNode.nodeType == 1){
            removeWhitespace(currentNode);
        }
        if (((/^\s+$/.test(currentNode.nodeValue))) &&(currentNode.nodeType == 3)){
            xml.removeChild(xml.childNodes[loopIndex--]);
        }
    }
}
function changeMenu( menuName ) {
	if (menuName == null || menuName == "" ) {
		return;
	}
	var menuTabs,li;
	menuTabs=document.getElementById("menuTabs");
	removeWhitespace(menuTabs);
	li=menuTabs.childNodes;
	for(var i=0;i<li.length;i++){
		li[i].className = "";
	}
	
	if ( document.getElementById(menuName) != null ) {
		document.getElementById(menuName).className = "current";
	}
}
</script>
<body>
	<div class="header" >
		<!-- <h1 id="logo">三棵<span class="green">松</span><span class="gray">房地产</span></h1> -->
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<img style="height: 75px; padding: 0; border: 0; align: middle;" alt="三棵松房地产" src="<%=basePath %>/images/global/logo3.jpg" />
		<h2 id="slogan"></h2>
		<form method="post" class="searchform" action="/sks/privilege/users/logon.do">
 			<%-- <input type="hidden" name="directUrl" value="${param.directUrl}" /> --%>
			<c:if test="${empty users}"> 
				<a href="/sks/privilege/user/reg.do?method=regUI" ><strong> [ 注册 ] </strong> </a>
				<a href="/sks/privilege/users/logon.do" > <strong> [ 登录 ] </strong></a>
			</c:if>
			<c:if test="${!empty users}"> 
					<a href="/sks/frontpages/privilege/deployment/list.do" ><strong> [ ${users.loginName} ]  </strong></a> 
					<a href="/sks/privilege/users/logout.do" ><strong>   [ 退出登录 ]</strong></a> 
			</c:if>
			<!-- <li>
  				<input type="submit" name="login" class="button" value="登陆" /></p>
  			</li> -->
		</form>
		<!-- Menu Tabs -->
		<ul id="menuTabs" class="menuTabs">
			<li class="current"><a href="<%=basePath %>"><span>首页</span></a></li>
			<li id="houseListBuy"><a href="<%=basePath %>sks/house.do?method=list&menuName=houseListBuy"><span>买房</span></a></li>
			<li id="houseListRent"><a href="<%=basePath %>sks/house.do?method=list&menuName=houseListRent"><span>租房</span></a></li>
			<li id="mapHouse"><a href="<%=basePath %>sks/map.do?method=list&menuName=mapHouse"><span>地图找房</span></a></li>
			<li id="village"><a href="<%=basePath %>sks/district.do?method=list&menuName=village"><span>小区</span></a></li>
			<li id="newsIndex"><a href="<%=basePath %>sks/news.do?method=indexNewsList&menuName=newsIndex"><span>资讯</span></a></li>
			<li id="aboutUs"><a href="<%=basePath %>sks.do?method=about"><span>关于我们</span></a></li>
		</ul>
	</div>
</body>
</html>